home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14470 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: d203.nb.interaccess.com!gcraig
  2. From: gcraig@interaccess.com (George Craig)
  3. Newsgroups: comp.lang.c
  4. Subject: Obtaining file lists in C?
  5. Date: Sun, 14 Apr 1996 22:29:35 LOCAL
  6. Organization: Ace Computer Systems
  7. Message-ID: <gcraig.1.001653A2@interaccess.com>
  8. NNTP-Posting-Host: d203.nb.interaccess.com
  9. Keywords: files, lists, listings, directory
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]
  11.  
  12. Could someone please tell me just one of the many ways I could implement an 
  13. efficient file listing technique in standard ANSI or k&R c?
  14.  
  15. I.e, I want to obtain a listing of the files in the current directory - could 
  16. I use a pointer to an array of strings? Whereas the strings are actually the 
  17. names of the files in the current directory.
  18.  
  19. If I could do that... (which I am almost positive I can) how would I obtain 
  20. the file listing into the variables. I want to avoid using system() and I 
  21. surely don't want to go low-level and read the file system's table(s) - any 
  22. and all help will surely be appreciated -- Thank you
  23.  
  24. George Craig
  25.  
  26.